<include file="public@header" />
</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInUp js-check-wrap">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>添加|编辑分类</h5>
                        <div class="ibox-tools">
                            <a href="{:url('cdkey/category')}" class="btn btn-primary btn-xs active">类别</a>
                            <a href="{:url('cdkey/addcategory')}" class="btn btn-primary btn-xs">添加分类</a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <form class="form-horizontal" action="{$action}" method="post">

                            <div class="form-group">
                                <label class="col-sm-2 control-label"><span class="form-required">*</span>名称</label>
                                <div class="col-sm-6">
                                    <input type="text" id="title" class='form-control' name="title" value="<?php echo $row['title'];?>" />
                                </div>
                            </div>


                            <div class="form-group">
                                <label class="col-sm-2 control-label"><span class="form-required">*</span>有效期</label>
                                <div class="col-sm-6">
                                    <select  class='form-control'  name='term'>
                                        <option value='365' <?php if($row['term']=='365') echo 'selected';?> >年</option>
                                        <option value='90'  <?php if($row['term']=='90') echo 'selected';?> >季</option>
                                        <option value='30'  <?php if($row['term']=='30') echo 'selected';?> >月</option>
                                    </select>
                                </div>
                            </div>
                           


                            <div class="form-group">
                                <label class="col-sm-2 control-label"><span class="form-required">*</span>价格(USTD)</label>
                                <div class="col-sm-6">
                                    <input type="text" class="form-control" id="price" name="price" value="<?php echo $row['price'];?>">
                                </div>
                            </div>

                            <input type='hidden'  name='id'  value="<?php echo $row['id'];?>"   />

                            <div class="form-group">
                                <div class="col-sm-offset-2 col-sm-6">
                                    <button type="submit" class="btn btn-primary">{:lang('ADD')}</button>
                                    <a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="__STATIC__/js/admin.js"></script>